﻿<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="T4UtilityBelt.DataDesigns" xmlns="T4UtilityBelt.DataDesigns">
  <xs:complexType name="GeneratorOptions">
    <xs:sequence />
    <xs:attribute name="Collection" type="xs:boolean" />
    <xs:attribute name="Entity" type="xs:boolean" />
    <xs:attribute name="Picker" type="xs:boolean" />
    <xs:attribute name="Synchronizer" type="xs:boolean" />
    <xs:attribute name="TestData" type="xs:boolean" />
    <xs:attribute name="Repository" type="xs:boolean" />
    <xs:attribute name="DatabaseTable" type="xs:boolean" />
    <xs:attribute name="DataContract" type="xs:boolean" />
    <xs:attribute name="DataRequest" type="xs:boolean" />
    <xs:attribute name="DataResponse" type="xs:boolean" />
    <xs:attribute name="SynchronizeService" type="xs:boolean" />
    <xs:attribute name="ModelCollection" type="xs:boolean" />
    <xs:attribute name="Model" type="xs:boolean" />
    <xs:attribute name="ServerDatabaseTable" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="Entity">
    <xs:sequence>
      <xs:element name="GeneratorOptions" type="GeneratorOptions" />
      <xs:element name="Properties" type="PropertyCollection" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="ListName" type="xs:string" />
    <xs:attribute name="PluralName" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="EntityModel">
    <xs:sequence>
      <xs:element name="Entities" type="EntityCollection" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Property">
    <xs:sequence />
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="PropertyType" type="xs:string" />
    <xs:attribute name="SecondaryType" type="xs:string" />
    <xs:attribute name="Required" type="xs:boolean" />
    <xs:attribute name="NotSearchable" type="xs:boolean" />
    <xs:attribute name="ReadOnly" type="xs:boolean" />
    <xs:attribute name="DefaultString" type="xs:string" />
    <xs:attribute name="SecondaryDefaultString" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="EntityProperty">
    <xs:complexContent>
      <xs:extension base="Property">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BoolProperty">
    <xs:complexContent>
      <xs:extension base="EntityProperty">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DoubleProperty">
    <xs:complexContent>
      <xs:extension base="EntityProperty">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DecimalProperty">
    <xs:complexContent>
      <xs:extension base="EntityProperty">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="IntProperty">
    <xs:complexContent>
      <xs:extension base="EntityProperty">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DateTimeProperty">
    <xs:complexContent>
      <xs:extension base="EntityProperty">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EnumProperty">
    <xs:complexContent>
      <xs:extension base="EntityProperty">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Parent">
    <xs:complexContent>
      <xs:extension base="Property">
        <xs:sequence />
        <xs:attribute name="ToName" type="xs:string" />
        <xs:attribute name="Association" type="xs:string" />
        <xs:attribute name="Multiplicity" type="Multiplicity" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ParentOne">
    <xs:complexContent>
      <xs:extension base="Parent">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ParentMany">
    <xs:complexContent>
      <xs:extension base="Parent">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PropertyComparer">
    <xs:sequence />
  </xs:complexType>
  <xs:complexType name="EntityCollection">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Entity" type="Entity" />
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="EntityComparer">
    <xs:sequence />
  </xs:complexType>
  <xs:complexType name="KeyProperty">
    <xs:complexContent>
      <xs:extension base="Property">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="Multiplicity">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Many" />
      <xs:enumeration value="One" />
      <xs:enumeration value="ZeroOrOne" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PropertyCollection">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="BoolProperty" type="BoolProperty" />
      <xs:element name="DoubleProperty" type="DoubleProperty" />
      <xs:element name="DecimalProperty" type="DecimalProperty" />
      <xs:element name="IntProperty" type="IntProperty" />
      <xs:element name="DateTimeProperty" type="DateTimeProperty" />
      <xs:element name="EnumProperty" type="EnumProperty" />
      <xs:element name="ParentOne" type="ParentOne" />
      <xs:element name="ParentMany" type="ParentMany" />
      <xs:element name="KeyProperty" type="KeyProperty" />
      <xs:element name="StringProperty" type="StringProperty" />
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="PropertyTypeInfo">
    <xs:sequence />
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="CsType" type="xs:string" />
    <xs:attribute name="SqlType" type="xs:string" />
    <xs:attribute name="CsTestData" type="xs:string" />
    <xs:attribute name="SqlTestData" type="xs:string" />
    <xs:attribute name="XmlTestData" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="PropertyTypeInfoDictionary">
    <xs:choice minOccurs="0" maxOccurs="unbounded" />
  </xs:complexType>
  <xs:complexType name="PropertyTypeInfoProvider">
    <xs:sequence />
  </xs:complexType>
  <xs:complexType name="StringProperty">
    <xs:complexContent>
      <xs:extension base="Property">
        <xs:sequence />
        <xs:attribute name="MaxLength" type="xs:integer" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>